<?$this->load->view('layouts/student_profile_head');?>

<?=$system_message;?>

<div class="clearfix"></div>

<div class="row">

		<legend>Set Payment Mode</legend>

	<table class="table">
	<tr>
		<form class="custom" method="POST" action="<?=site_url('fees/set_payment_mode/'.$id.'/'.$auth);?>">
		<?php
		foreach($payment_modes as $payment_mode):
		?>
		<td>
			<label class="label" style="text-transform: capitalize;"><?php echo $payment_mode->payment_mode_name; ?></label>
			<input type="radio" name="selected_payment_mode" value="<?php echo $payment_mode->payment_mode_name; ?>" <?php if($selected_payment_mode){ if($selected_payment_mode->payment_mode == $payment_mode->payment_mode_name){ echo 'checked'; } } ?>/>
		</td>
		<?php
		endforeach;
		?>
		<td>
			<input type="hidden" name="stpr_loc" value="<?=$token;?>">
			<input type="submit" name="set_student_payment_mode" class="btn btn-primary btn-small" value="Set Payment Plan">
		</td>
		</form>
	</tr>
	</table>

</div>

<!--
<table class="table table-striped table-hover">
	<thead>
		<tr>
			<td>Month</td>
			<td colspan="4" class="text-center text-info">Payment Modes</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td>ANNUAL</td>
			<td>SEMESTRAL</td>
			<td>TRIMESTER</td>
			<td>MONTHLY</td>
		</tr>
	</thead>
	<tbody>
		<?if(!empty($payment_mode)):
			foreach($payment_mode as $k => $v)
			{
				@$var_name = $v->setting_name;
				@$$var_name= $v->setting_value;
				$data = $v->setting_group;
			}
		?>
		<tr>
			<td>Registration</td>
			<td><?=${'annual_'.$data.'_reg'};?></td>
			<td><?=${'semestral_'.$data.'_reg'};?></td>
			<td><?=${'trimester_'.$data.'_reg'};?></td>
			<td><?=${'monthly_'.$data.'_reg'};?></td>
		</tr>
		<tr>
			<td>January</td>
			<td><?=${'annual_'.$data.'_jan'};?></td>
			<td><?=${'semestral_'.$data.'_jan'};?></td>
			<td><?=${'trimester_'.$data.'_jan'};?></td>
			<td><?=${'monthly_'.$data.'_jan'};?></td>
		</tr>
		<tr>
			<td>Febuary</td>
			<td><?=${'annual_'.$data.'_feb'};?></td>
			<td><?=${'semestral_'.$data.'_feb'};?></td>
			<td><?=${'trimester_'.$data.'_feb'};?></td>
			<td><?=${'monthly_'.$data.'_feb'};?></td>
		</tr>
		<tr>
			<td>March</td>
			<td><?=${'annual_'.$data.'_mar'};?></td>
			<td><?=${'semestral_'.$data.'_mar'};?></td>
			<td><?=${'trimester_'.$data.'_mar'};?></td>
			<td><?=${'monthly_'.$data.'_mar'};?></td>
		</tr>
		<tr>
			<td>April</td>
			<td><?=${'annual_'.$data.'_apr'};?></td>
			<td><?=${'semestral_'.$data.'_apr'};?></td>
			<td><?=${'trimester_'.$data.'_apr'};?></td>
			<td><?=${'monthly_'.$data.'_apr'};?></td>
		</tr>
		<tr>
			<td>May</td>
			<td><?=${'annual_'.$data.'_may'};?></td>
			<td><?=${'semestral_'.$data.'_may'};?></td>
			<td><?=${'trimester_'.$data.'_may'};?></td>
			<td><?=${'monthly_'.$data.'_may'};?></td>
		</tr>
		<tr>
			<td>June</td>
			<td><?=${'annual_'.$data.'_jun'};?></td>
			<td><?=${'semestral_'.$data.'_jun'};?></td>
			<td><?=${'trimester_'.$data.'_jun'};?></td>
			<td><?=${'monthly_'.$data.'_jun'};?></td>
		</tr>
		<tr>
			<td>July</td>
			<td><?=${'annual_'.$data.'_jul'};?></td>
			<td><?=${'semestral_'.$data.'_jul'};?></td>
			<td><?=${'trimester_'.$data.'_jul'};?></td>
			<td><?=${'monthly_'.$data.'_jul'};?></td>
		</tr>
		<tr>
			<td>August</td>
			<td><?=${'annual_'.$data.'_aug'};?></td>
			<td><?=${'semestral_'.$data.'_aug'};?></td>
			<td><?=${'trimester_'.$data.'_aug'};?></td>
			<td><?=${'monthly_'.$data.'_aug'};?></td>
		</tr>
		<tr>
			<td>September</td>
			<td><?=${'annual_'.$data.'_sep'};?></td>
			<td><?=${'semestral_'.$data.'_sep'};?></td>
			<td><?=${'trimester_'.$data.'_sep'};?></td>
			<td><?=${'monthly_'.$data.'_sep'};?></td>
		</tr>
		<tr>
			<td>October</td>
			<td><?=${'annual_'.$data.'_oct'};?></td>
			<td><?=${'semestral_'.$data.'_oct'};?></td>
			<td><?=${'trimester_'.$data.'_oct'};?></td>
			<td><?=${'monthly_'.$data.'_oct'};?></td>
		</tr>
		<tr>
			<td>November</td>
			<td><?=${'annual_'.$data.'_nov'};?></td>
			<td><?=${'semestral_'.$data.'_nov'};?></td>
			<td><?=${'trimester_'.$data.'_nov'};?></td>
			<td><?=${'monthly_'.$data.'_nov'};?></td>
		</tr>
		<tr>
			<td>December</td>
			<td><?=${'annual_'.$data.'_dec'};?></td>
			<td><?=${'semestral_'.$data.'_dec'};?></td>
			<td><?=${'trimester_'.$data.'_dec'};?></td>
			<td><?=${'monthly_'.$data.'_dec'};?></td>
		</tr>
		<tr>
			<td><strong>TOTAL</strong></td>
			<td><input class="table-input2" class="annual"  type="text" value="" placeholder="Total Annual" disabled></td>
			<td><input class="table-input2" class="semestral"  type="text" value="" placeholder="Total Semestral"  disabled></td>
			<td><input class="table-input2" class="trimester" type="text" value="" placeholder="Total Trimester"  disabled></td>
			<td><input class="table-input2" class="monthly" type="text" value="" placeholder="Total Monthly"  disabled></td>
		</tr>
		<?else:?>
		<tr class="error">
			<td colspan="5">An Error Has Occurred, System was unable to retrieve student payment modes and values for this level. Please check with you're administrator if a payment mode for this grade level exists.</td>
		</tr>
		<?endif;?>
	</tbody>
</table>

<div class="row">
	<fieldset>
		<legend>Set Payment Mode</legend>
		<form class="custom" method="POST" action="<?=site_url('fees/set_payment_mode/'.$id.'/'.$auth);?>">
			<div class="large-3 smal-6 columns">
				<div class="large-3 smal-6 columns">
					<input type="radio" name="selected_payment_mode" value="monthly" <?=$selected_payment_mode == 'monthly' ? 'checked' : NULL;?>/>
				</div>
				<div class="large-3 smal-6 columns">
					<label class="label">Monthly</label>
				</div>
			</div>
			<div class="clearfix"></div>
			
			<div class="large-3 small-12 columns">
				<div class="large-3 smal-6 columns">
					<input type="radio" name="selected_payment_mode" value="annual" <?=$selected_payment_mode == 'annual' ? 'checked' : NULL;?>>
				</div>
				<div class="large-3 smal-6 columns">
					<label class="label">Annual</label>
				</div>
			</div>
			<div class="clearfix"></div>
			
			<div class="large-3 small-12 columns">
				<div class="large-3 smal-6 columns">
					<input type="radio" name="selected_payment_mode" value="semestral" <?=$selected_payment_mode == 'semestral' ? 'checked' : NULL;?>>
				</div>
				<div class="large-3 smal-6 columns">
					<label class="label">Semestral</label>
				</div>
			</div>
			<div class="clearfix"></div>
			
			<div class="large-3 smal-6 columns">
				<div class="large-3 smal-6 columns">
					<input type="radio" name="selected_payment_mode" value="trimester" <?=$selected_payment_mode == 'trimester' ? 'checked' : NULL;?>>
				</div>
				<div class="large-3 smal-6 columns">
					<label class="label">Trimester</label>
				</div>
			</div>
			<div class="clearfix"></div>
			
			<div class="large-3 smal-6 columns">
				<div class="large-3 smal-6 columns">
					<input type="radio" name="selected_payment_mode" value="none" <?=$selected_payment_mode == false ? 'checked' : NULL;?>>
				</div>
				<div class="large-3 smal-6 columns">
					<label class="label">None</label>
				</div>
			</div>
			<hr class="clearfix">
			
			<div class="large-3 smal-6 columns">
				<div class="large-3 smal-6 columns">
					<input type="hidden" name="stpr_loc" value="<?=$token;?>">
					<input type="submit" name="set_student_payment_mode" class="btn btn-primary" value="Set Payment Modes">
				</div>
			</div>
		</form>
	</fieldset>
</div>
-->